<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 <%@ page import="org.dbi.rdbms.Rdbms, org.servlets.RdbmsServlet"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<a href=init.jsp>init</a> | 
<b><a href=showdatabases.jsp>show databases</a></b> | 
<a href=showtables.jsp>show tables</a>| 
<a href=select.jsp>select query</a><br> <br>
	<% for(String s : Rdbms.getInstance().showDatabases()){ %>
		<a href="usedb.jsp?db=<%=s%>"><%=s%></a><br>
	<%} %>
	
<form name="frm" action="RdbmsServlet" method="post">
<H2>Nieuwe database aanmaken</H2>
<P>Geef databasenaam op: <INPUT TYPE="TEXT" NAME="createDatabase"><br>
<input type="hidden" name="submit" value="<%= RdbmsServlet.CREATE_DATABASE %>" />
<INPUT type="submit" Value="Opslaan">
</P>
</form>
<div id="result">
	<%if(request.getSession().getAttribute("result") != null){
		out.println(request.getSession().getAttribute("result"));
		request.getSession().setAttribute("result","");
		}
	%>
</div>
	
</body>
</html>